// import 'bootstrap/dist/css/bootstrap.min.css';
import "nprogress/nprogress.css";
import '../styles/stylesheet.scss';
import '../styles/responsive.scss';
import { AppStore } from '../store';
import nProgress from "nprogress";
import Router from "next/router";
import { PayPalScriptProvider } from '@paypal/react-paypal-js';
import Script from 'next/script';
Router.events.on("routeChangeStart", nProgress.start);
Router.events.on("routeChangeError", nProgress.done);
Router.events.on("routeChangeComplete", nProgress.done);

function MyApp({ Component, pageProps }) {
console.log('paypal',process.env.PAYPALID)
  return (
    <>

      <Script strategy="lazyOnload" src={`https://www.googletagmanager.com/gtag/js?id=G-TS6YWFKLF5`} />

      <Script strategy="lazyOnload">
        {`
                    window.dataLayer = window.dataLayer || [];
                    function gtag(){dataLayer.push(arguments);}
                    gtag('js', new Date());
                    gtag('config', 'G-TS6YWFKLF5', {
                    page_path: window.location.pathname,
                    });
                `}
      </Script>
      <AppStore>
        <PayPalScriptProvider options={{
          "client-id": "AQCFnn4WDVBml9fghBsvmgEDa6x4jBJnVt2rD3Y2ivT-RxtPWlMHXzmmTOfVaN2H7e_O6darQdh2iCEq",
        }}>
          <Component {...pageProps} />
        </PayPalScriptProvider>
      </AppStore>
    </>
  )

}

export default MyApp
